

// start-11111111111111
// 核心业务功能：点击nav导航栏，界面切换

// var Note = document.getElementById("Note");
// Note.style.display = "none";

//获取Home,Detail,Note三个按钮
var nav_Home = document.getElementById("nav_Home");
var nav_Detail = document.getElementById("nav_Detail");
var nav_Note = document.getElementById("nav_Note");

// 获取Home,Detail,Note三个页面
var Home = document.getElementById("Home");
var Note = document.getElementById("Note");
var Detail = document.getElementById("Detail");

// 1.点击Detail,--->自己显示，Home,Note不显示
nav_Detail.onclick = function() {
	nav_Detail.style.color = "#5F7FFF";
	nav_Detail.style.borderBottom = "4px solid #5F5FFF";
	Detail.style.display = "block";
	nav_Home.style.color = "#9e9e9e";
	nav_Home.style.border = "none";
	Home.style.display = "none";
	nav_Note.style.color = "#9e9e9e";
	nav_Note.style.border = "none";
	Note.style.display = "none";
}

// 1.点击Note,--->自己显示，Home,Detail不显示
nav_Note.onclick = function() {
	nav_Note.style.color = "#5F7FFF";
	nav_Note.style.borderBottom = "4px solid #5F5FFF";
	Note.style.display = "block";
	nav_Home.style.color = "#9e9e9e";
	nav_Home.style.border = "none";
	Home.style.display = "none";
	nav_Detail.style.color = "#9e9e9e";
	nav_Detail.style.border = "none";
	Detail.style.display = "none";
}
// 1.点击Home,--->自己显示，Detail,Note不显示
nav_Home.onclick = function() {
	nav_Home.style.color = "#5F7FFF";
	nav_Home.style.borderBottom = "4px solid #5F5FFF";
	Home.style.display = "block";
	nav_Detail.style.color = "#9e9e9e";
	nav_Detail.style.border = "none";
	Detail.style.display = "none";
	nav_Note.style.color = "#9e9e9e";
	nav_Note.style.border = "none";
	Note.style.display = "none";
}

// end-11111111111111


// start-222222222222222
// 非核心业务：未开放功能提示

//获取Home页发送按钮，顶部联系我，分享，主题切换 
var send = document.getElementById("send");
var button1 = document.getElementById("button1");
var button2 = document.getElementById("button2");
var button3 = document.getElementById("button3");
var more = document.getElementById("more");

// var pro = document.getElementsByClassName("project");


send.onclick = function() {
	alert('提示：已经完成提交，感谢您的支持！');
	location.reload();
}
button1.onclick = function() {
	alert('Email : deepmain@foxmail.com');
}
button2.onclick = function() {
	alert('提示：复制地址栏中的地址，http://webyyl.gitee.io');
}
// more.onclick = function() {
// 	alert('提示：此功能暂未开放！');
// }
// button3.onclick = function() {
// 	alert('提示：此功能暂未开放！');
// }



// 点击以上按钮之后弹出对话框，提示：此功能暂未开放
// end-22222222222222222


// start-333333333333333333
// 主题切换:次核心业务

// 当user点击button3按钮时候,整个界面的颜色发生变化
// 浅色-->深色；
// 深色-->浅色
// var button3 = document.getElementById("button3");
// 深色主题模块（dark）
var body = document.getElementById('body');
var nam = document.getElementById('nam');
var titl = document.getElementById('titl');
var h = document.getElementById('h');
var p0 = document.getElementById('p0');
var p1 = document.getElementById('p1');
var p2 = document.getElementById('p2');
var p3 = document.getElementById('p3');
// var p4 = document.getElementById('p4');
var about_website = document.getElementById('about_website');
var log1 = document.getElementById('log1');
var log2 = document.getElementById('log2');
var log3 = document.getElementById('log3');
var log4 = document.getElementById('log4');
var log5 = document.getElementById('log5');
var pro_text = document.getElementsByClassName('pro_miaoshu');
var m1 = document.getElementById('m1');
var inp1 = document.getElementById('inp1');
var inp2 = document.getElementById('inp2');
var inp3 = document.getElementById('inp3');
var inp4 = document.getElementById('inp4');
var inp5 = document.getElementById('inp5');
var inp6 = document.getElementById('inp6');
var more = document.getElementById('more');
var img1 = document.getElementById('img1');
var yyl_logogo = document.getElementById('yyl_logogo');
var foot = document.getElementById('foot');

var fun_button3_click	= function() {
	button1.style.backgroundColor = "#242424";
	button1.style.color = "#fff";
	button1.style.transition = "all 0.7s";
	button2.style.backgroundColor = "#242424";
	button2.style.backgroundImage = "url(./logos/fenxiang_dark.png)";
	button2.style.transition = "all 0.7s";
	button3.style.backgroundColor = "#242424";
	button3.style.backgroundImage = "url(./logos/kaiguan_dark.png)";
	button3.style.transition = "all 1.1s";
	// body.style.backgroundColor = "#1A1A1A";
	body.style.backgroundColor = "rgba(26,26,26,0.97)";
	body.style.transition = "all 0.7s";
	nam.style.color = "#ffffff";
	nam.style.transition = "all 0.7s";
	titl.style.color = "#ffffff";
	titl.style.transition = "all 0.7s";
	h.style.border = "0.01px solid #7d7f7d;";
	p0.style.color = "#ffffff";
	p1.style.color = "#ffffff";
	p2.style.color = "#ffffff";
	p3.style.color = "#ffffff";
	// p4.style.color = "#ffffff";
	about_website.style.color = "#ffffff";
	log1.style.color = "#ffffff";
	log2.style.color = "#ffffff";
	log3.style.color = "#ffffff";
	log4.style.color = "#ffffff";
	log5.style.color = "#ffffff";
	
	// console.log(pro_text);
	// pro_text[0].style.color = "#fff";
	m1.style.color = "#ffffff";
	m1.style.transition = "all 0.7s";
	inp1.style.backgroundColor = "#242424";
	inp1.style.transition = "all 0.7s";
	inp2.style.backgroundColor = "#242424";
	inp2.style.transition = "all 0.7s";
	inp3.style.backgroundColor = "#242424";
	inp4.style.backgroundColor = "#242424";
	inp5.style.backgroundColor = "#242424";
	inp6.style.backgroundColor = "#242424";
	// more.style.backgroundColor = "#242424";
	// more.style.color = "#fff";
	img1.src = "./pro_logo/webyyl_dark.png";
	yyl_logogo.style.border = "4px solid #ccc";
	yyl_logogo.style.transition = "all 0.7s";
	foot.src = "./logos/footer_dark1.png";
	
}
button3.onclick = fun_button3_click;




// 浅色主题模块（light）




// 获取user电脑的主题颜色是什么
// const isDarkTheme = window.matchMedia("(prefers-color-scheme: dark)"); // 是深色
// if (isDarkTheme.matches) { // 是深色
//   // 主题设置为深色。
//   console.log("win为dark");
//   fun_button3_click();
// } else { // 不是深色
//   // 主题设置为浅色。
//   console.log("win为light");
// }


// 根据user的电脑主题设置网站的主题颜色，跟着切换
// setInterval(function(){
// 	// console.log(111);
// 	const isDarkTheme = window.matchMedia("(prefers-color-scheme: dark)"); // 是深色
// 	if (isDarkTheme.matches) { // 是深色
// 	  // 主题设置为深色。
// 	  console.log("win为dark");
// 	  fun_button3_click();
// 	} else { // 不是深色
// 	  // 主题设置为浅色。
// 	  console.log("win为light");
// 	}
// },1000) 
// end-333333333333333333

// start----------4444444444444

// window.onload = function(){
// 	alert('提示：网站目前对手机端支持较差，为了更好的体验请在电脑端访问！');
// };


// end----------4444444444444